package com.qnbc.mystery.pojo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qnbc.mystery.core.annotation.Excel;
import com.qnbc.mystery.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 地区码对象 pro_area
 *
 * @author guzj
 * @date 2024-01-24
 */
@ApiModel("地区码")
public class ProArea {
    private static final long serialVersionUID = 1L;

    /** 地区Id */
    /**
     * 编号
     */
    @TableId(type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long areaid;

    /**
     * 地区编码
     */
    @Excel(name = "地区编码")
    private String areacode;

    /**
     * 地区名
     */
    @Excel(name = "地区名")
    private String areaname;

    /**
     * 地区级别（1:省份province,2:市city,3:区县district,4:街道street）
     */
    @Excel(name = "地区级别", readConverterExp = "1=:省份province,2:市city,3:区县district,4:街道street")
    private Long level;

    /**
     * 城市编码
     */
    @Excel(name = "城市编码")
    private String citycode;

    /**
     * 城市中心点（即：经纬度坐标）
     */
    @Excel(name = "城市中心点", readConverterExp = "即=：经纬度坐标")
    private String center;

    /**
     * 地区父节点
     */
    @Excel(name = "地区父节点")
    private Long parentid;

    @TableField(exist = false)
    private Integer pageSize;
    @TableField(exist = false)
    private Integer pageNum;


    //二级数据
    @ApiModelProperty("二级数据")
    @TableField(exist = false)
    private List<ProArea> proAreaList;


    public List<ProArea> getProAreaList() {
        return proAreaList;
    }

    public void setProAreaList(List<ProArea> proAreaList) {
        this.proAreaList = proAreaList;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public void setAreaid(Long areaid) {
        this.areaid = areaid;
    }

    public Long getAreaid() {
        return areaid;
    }

    public void setAreacode(String areacode) {
        this.areacode = areacode;
    }

    public String getAreacode() {
        return areacode;
    }

    public void setAreaname(String areaname) {
        this.areaname = areaname;
    }

    public String getAreaname() {
        return areaname;
    }

    public void setLevel(Long level) {
        this.level = level;
    }

    public Long getLevel() {
        return level;
    }

    public void setCitycode(String citycode) {
        this.citycode = citycode;
    }

    public String getCitycode() {
        return citycode;
    }

    public void setCenter(String center) {
        this.center = center;
    }

    public String getCenter() {
        return center;
    }

    public void setParentid(Long parentid) {
        this.parentid = parentid;
    }

    public Long getParentid() {
        return parentid;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("areaid", getAreaid())
                .append("areacode", getAreacode())
                .append("areaname", getAreaname())
                .append("level", getLevel())
                .append("citycode", getCitycode())
                .append("center", getCenter())
                .append("parentid", getParentid())
                .toString();
    }
}
